<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path;
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="renderer" content="webkit">

<title>登录</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon">
<!-- Mainly scripts -->
<script type="text/javascript" src="<%=path%>/js/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="<%=path%>/js/bootstrap.min.js?v=3.4.0"></script>

<script type="text/javascript" src="${pageContext.request.contextPath}/js/util/enctry.js"></script>

<!-- Mainly scripts -->
<script src="<%=path%>/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="<%=path%>/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>

<!-- Custom and plugin javascript -->
<script src="<%=path%>/js/hplus.js?v=2.2.0"></script>
<script src="<%=path%>/js/plugins/pace/pace.min.js"></script>

<!-- iCheck -->
<script src="<%=path%>/js/plugins/iCheck/icheck.min.js"></script>
    
<link href="<%=path%>/css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
<link href="<%=path%>/font-awesome/css/font-awesome.css?v=4.3.0" rel="stylesheet">
<link href="<%=path%>/css/plugins/iCheck/custom.css" rel="stylesheet">
<link href="<%=path%>/css/animate.css" rel="stylesheet">
<link href="<%=path%>/css/style.css?v=2.2.0" rel="stylesheet">

<script type="text/javascript">
	$(document).ready(function () {
	    $('.i-checks').iCheck({
	        checkboxClass: 'icheckbox_square-green',
	        radioClass: 'iradio_square-green',
	    });
	});

	function checkForm(){
		var password = $("#password").val();
		if("" != password){
			$('#password').val( enctry(password,'<%=request.getSession().getId().substring(0, 16)%>'));
			return true;
		}
	}
</script>
</head>
<body class="gray-bg">

	<div class="middle-box text-center loginscreen  animated fadeInDown">
		<div>
			<div>

				<h1 class="logo-name">qh</h1>

			</div>
			<h3>欢迎使用</h3>
			<c:if test="${not empty sessionScope.message }">
				<span style="color:red;"> ${message } </span>
			</c:if>

			<form class="m-t" role="form" action="<%=path%>/sys/login"
				method="post">
				<div class="form-group">
					<input type="username" class="form-control" placeholder="用户名"
						required="" name="username" id="username" value="1">
				</div>
				<div class="form-group">
					<input type="password" class="form-control" placeholder="密码"
						required="" name="password" id="password" value="1">
				</div>
				
				<div class="checkbox m-l m-r-xs" style="left:-120px">
                  <label class="i-checks">
                      <input type="checkbox" name="remember" value="1" <c:if test="${remember eq 1 }">checked</c:if> ><i></i>下次自动登录</label>
               </div>
				<button type="submit" class="btn btn-primary block full-width m-b"
					onclick="return checkForm();">登 录</button>


				<p class="text-muted text-center">
					<a href="login.html#"><small>忘记密码了？</small></a> | <a
						href="register.html">注册一个新账号</a>
				</p>

			</form>
		</div>
	</div>
</body>
</html>